﻿/*----------------------------------------------------------------
  //Copyright (C) 2012 赵国伟
  //文件功能描述：区域管理
  //创建人：赵国伟
  //生成时间：2012/03/29 16:15:00
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Shopping.Common;
using Shopping.Model;
using Shopping.BLL;

public partial class Manage_AreasManage : BaseManagePage
{

    protected string SelectOptionOfProvince; //省份下拉选项；
    protected string SelectOptionOfCity; //城市下拉选项；

    protected int ProvinceID; //省份ID;
    protected int CityID; //城市ID;
    protected string KeyWords; //区域搜索关键字；
    protected AsPage p; //分页对象；

    protected List<AreaInfo> listOfAreas; //区域信息对象；

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ProvinceID = Utility.G<int>("ProvinceID");
            CityID = Utility.G<int>("CityID");
            KeyWords = Utility.G("KeyWords");

            p = new AsPage();
            p.CurPage = Utility.G<int>("CurPage");
            if (p.CurPage <= 0)
                p.CurPage = 1;
            SelectOptionOfProvince = ProvinceCityAreasManage.QueryProvincesToSelectOption(ProvinceID.ToString());
            if (ProvinceID > 0)
                SelectOptionOfCity = ProvinceCityAreasManage.QueryCitiesToSelectOption(ProvinceID, CityID.ToString());
            ProvinceCityAreasManage bllArea = new ProvinceCityAreasManage();
            listOfAreas = bllArea.QueryAreasAsPage(KeyWords, CityID, ProvinceID, p);

        }
    }


}